package mahi.thread;


//Thread Interference
//Memory Consistency Errors (inconsistent view of same data)  use volatile
public class Counter1 {
	private  int c = 0;

	
    public synchronized void increment() {
        c++;
    }

    public synchronized void decrement() {
        c--;
    }

    public int value() {
        return c;
    }

}

